//
//  SteperViewController.swift
//  UI
//
//  Created by admin on 14/9/22.
//  Copyright (c) 2014年 sinosun. All rights reserved.
//
/*

var continuous: Bool // if YES, value change events are sent any time the value changes during interaction. default = YES
var autorepeat: Bool // if YES, press & hold repeatedly alters value. default = YES
var wraps: Bool // if YES, value wraps from min <-> max. default = NO

var value: Double // default is 0. sends UIControlEventValueChanged. clamped to min/max
var minimumValue: Double // default 0. must be less than maximumValue
var maximumValue: Double // default 100. must be greater than minimumValue
var stepValue: Double // default 1. must be greater than 0

// The tintColor is inherited through the superview hierarchy. See UIView for more information.
@availability(iOS, introduced=6.0)
var tintColor: UIColor!

// a background image which will be 3-way stretched over the whole of the control. Each half of the stepper will paint the image appropriate for its state
@availability(iOS, introduced=6.0)
func setBackgroundImage(image: UIImage?, forState state: UIControlState)

@availability(iOS, introduced=6.0)
func backgroundImageForState(state: UIControlState) -> UIImage



// an image which will be painted in between the two stepper segments. The image is selected depending both segments' state
@availability(iOS, introduced=6.0)
func setDividerImage(image: UIImage?, forLeftSegmentState leftState: UIControlState, rightSegmentState rightState: UIControlState)


@availability(iOS, introduced=6.0)
func dividerImageForLeftSegmentState(state: UIControlState, rightSegmentState state: UIControlState) -> UIImage!

// the glyph image for the plus/increase button
@availability(iOS, introduced=6.0)
func setIncrementImage(image: UIImage?, forState state: UIControlState)


@availability(iOS, introduced=6.0)
func incrementImageForState(state: UIControlState) -> UIImage

// the glyph image for the minus/decrease button
@availability(iOS, introduced=6.0)
func setDecrementImage(image: UIImage?, forState state: UIControlState)


@availability(iOS, introduced=6.0)
func decrementImageForState(state: UIControlState) -> UIImage
*/
import UIKit

class SteperViewController: UIViewController {

    @IBOutlet var steper: UIStepper!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    @IBAction func valueChange(sender: AnyObject) {
        var steper = sender as UIStepper
        println("value=\(steper.value)")
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
